import java.io.IOException;

/*
    将题目写入文件的测试类
 */
public class ExpressionGenerator {
    public static void main(String[] args) throws IOException {
        Practice io = new IOPractice();
        if (args.length != 3) {
            System.err.println("请按正确格式运行：java ExpressionGenerator <number-of-expressions> <number-of-operator> <output-file-path>");
            System.exit(1);
        }
        int many = Integer.parseInt(args[0]);
        int grade = Integer.parseInt(args[1]);
        if (Integer.parseInt(args[1]) == 0)
            grade = 1;
        io.Ti(many,grade);
        ((IOPractice)io).inFile(args[2]);
    }
}